package iii.myangel;

import android.os.Bundle;
import android.app.Activity;
import android.content.Intent;
import android.view.Menu;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;

public class MainControlActivity extends Activity {

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_maincontrol);
		InitialComponent();
	}

	OnClickListener btnEatMedicne_click = new OnClickListener() {
		public void onClick(View arg0) {

			Intent intent = new Intent(MainControlActivity.this,
					EatMedTimeActivity.class);
			startActivity(intent);

		}
	};
	OnClickListener btnMapRecord_click = new OnClickListener() {
		public void onClick(View arg0) {

			Intent intent = new Intent(MainControlActivity.this,
					MapRecordActivity.class);
			startActivity(intent);

		}
	};
	OnClickListener btnEatMedicneRecord_click = new OnClickListener() {
		public void onClick(View arg0) {

			Intent intent = new Intent(MainControlActivity.this,
					MedicineRecordActivity.class);
			startActivity(intent);

		}
	};
	OnClickListener btnOldManAccount_click = new OnClickListener() {
		public void onClick(View arg0) {

			Intent intent = new Intent(MainControlActivity.this,
					PatientActivity.class);
			startActivity(intent);

		}
	};

	@Override
	public boolean onCreateOptionsMenu(Menu menu) {
		// Inflate the menu; this adds items to the action bar if it is present.
		getMenuInflater().inflate(R.menu.main, menu);
		return true;
	}

	private void InitialComponent() {
		btnEatMedicne = (Button) findViewById(R.id.btnEatMedicne);
		btnEatMedicne.setOnClickListener(btnEatMedicne_click);
		btnMapRecord = (Button) findViewById(R.id.btnMapRecord);
		btnMapRecord.setOnClickListener(btnMapRecord_click);
		btnEatMedicneRecord = (Button) findViewById(R.id.btnEatMedicneRecord);
		btnEatMedicneRecord.setOnClickListener(btnEatMedicneRecord_click);
		btnOldManAccount = (Button) findViewById(R.id.btnOldManAccount);
		btnOldManAccount.setOnClickListener(btnOldManAccount_click);

	}

	Button btnEatMedicne = null;
	Button btnMapRecord = null;
	Button btnEatMedicneRecord = null;
	Button btnOldManAccount = null;

}
